<?php
/**
 * 分销
 */
namespace app\admin\controller;

use think\facade\Request;
use app\common\Error;
use app\common\Common;
use app\admin\service\DistributionService;

class Distribution extends Base
{
    private $service;

    public function __construct(DistributionService $service)
    {
        parent::__construct();
        $this->service = $service;
    }

    // 渲染分销商分成统计列表页
    public function index()
    {
        return view();
    }

    // 分销商分成统计列表
    public function list()
    {
        $params = Request::param();
        $data = $this->service->getDividedStatisticsList($params);

        return Common::success($data);
    }

    // 分销商下拉列表
    public function selectList()
    {
        $data = $this->service->getSelectList();

        return Common::success($data);
    }

    // 分成合计
    public function divideIntoTotal()
    {
        $params = Request::param();
        $data = $this->service->getDivideIntoTotal($params);

        return Common::success($data);
    }

    // 渲染分销商实时充值列表页
    public function realTimeIndex()
    {
        return view();
    }

    // 分销商今日充值
    public function realTimeRecharge()
    {
        $params = Request::param();
        $data = $this->service->getRealTimeRechargeList($params);

        return Common::success($data);
    }

    // 渲染分销商实时充值列表页
    public function distributorIndex()
    {
        return view();
    }

    // 分销商充值排名统计
    public function distributorRanking()
    {
        $params = Request::param();
        $data = $this->service->getRealTimeRechargeRankingList($params);

        return Common::success($data);
    }

    // 分销商短剧统计列表
    public function shortIndexRanking()
    {
        $params = Request::param();

        $data = $this->service->getShortRealTimeRechargeRankingList($params);

        return Common::success($data);
    }

    // 渲染分销商短剧统计列表
    public function shortIndex()
    {
        return view();
    }

    // 分销商短剧统计总数
    public function shortRankingCount()
    {
        $params = Request::param();
        $data = $this->service->getShortRealTimeRechargeRankingCount($params);

        return Common::success($data);
    }

    // 分销商今日累计充值
    public function realTimeRechargeSum()
    {
        $params = Request::param();
        $data = $this->service->getRealTimeRechargeSum($params);

        return Common::success($data);
    }

    // 渲染分销商H5短信分成列表
    public function smsSharingIndex()
    {
        return view();
    }

    // 分销商H5短信分成列表
    public function smsSharingList()
    {
        $params = Request::param();

        $data = $this->service->getSmsSharingList($params);

        return Common::success($data);
    }
}